import type { RouteRecordRaw } from 'vue-router'

function Layout() {
  return import('@/layouts/index.vue')
}

const routes: RouteRecordRaw = {
  path: '/aftersales',
  component: Layout,
  redirect: '/aftersales/index',
  name: 'aftersales',
  meta: {
    title: '运费险',
    icon: 'material-symbols:policy-outline-rounded',
  },
  children: [
    {
      path: 'index',
      name: 'aftersalesIndex',
      component: () => import('@/views/aftersales/index.vue'),
      meta: {
        title: '售后申请记录',
      },
    },
    {
      path: 'policyrecordList',
      name: 'policyrecordList',
      component: () => import('@/views/aftersales/policyrecordList.vue'),
      meta: {
        title: '保单记录',
      },
    },
    {
      path: 'claimrecordList',
      name: 'claimrecordList',
      component: () => import('@/views/aftersales/claimrecordList.vue'),
      meta: {
        title: '理赔记录',
      },
    },
  ],
}

export default routes
